/*
 * @Description: 
 * @Author: HKH
 * @Date: 2024-10-15 14:37:40
 * @LastEditors: HKH
 * @LastEditTime: 2024-10-15 15:25:34
 */
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;

public class Test05 {
    public static void main(String[] args) throws Exception {
        File file =new File("C:\\Users\\Administrator\\Desktop\\Java\\day32\\Test05.java");
        InputStreamReader isr =new InputStreamReader(new FileInputStream(file),"GBK");
        char[] date =new char[8];
        int length;
        while ((length=isr.read(date))!=-1) {
            System.out.println(new String(date,0,length));
        }
        isr.close();
    }
}